home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / SegLoad.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  2.3 KB  |  109 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        SegLoad.p
  3.  
  4.      Contains:    Segment Loader Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT SegLoad;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __SEGLOAD__}
  27. {$SETC __SEGLOAD__ := 1}
  28.  
  29. {$I+}
  30. {$SETC SegLoadIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36.  
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42. {$IFC TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM }
  43. {
  44.    CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  45.    and the AppFile data structure and enums are obsolete. 
  46.    They are still supported for writing old style 68K apps, 
  47.    but they are not supported for CFM-based apps.
  48.    Use AppleEvents to determine which files are to be 
  49.    opened or printed from the Finder.
  50. }
  51.  
  52. CONST
  53.     appOpen                        = 0;                            { Open the Document (s) }
  54.     appPrint                    = 1;                            { Print the Document (s) }
  55.  
  56.  
  57. TYPE
  58.     AppFilePtr = ^AppFile;
  59.     AppFile = RECORD
  60.         vRefNum:                INTEGER;
  61.         fType:                    OSType;
  62.         versNum:                INTEGER;                                { versNum in high byte }
  63.         fName:                    Str255;
  64.     END;
  65.  
  66. PROCEDURE CountAppFiles(VAR message: INTEGER; VAR count: INTEGER);
  67. PROCEDURE GetAppFiles(index: INTEGER; VAR theFile: AppFile);
  68. PROCEDURE ClrAppFiles(index: INTEGER);
  69. PROCEDURE GetAppParms(VAR apName: Str255; VAR apRefNum: INTEGER; VAR apParam: Handle);
  70.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  71.     INLINE $A9F5;
  72.     {$ENDC}
  73. {$ENDC}
  74.  
  75. {
  76.    Because PowerPC applications don’t have segments.
  77.    But, in order to allow applications to not have conditionalized
  78.    source code, UnloadSeg is macro'ed away for PowerPC.
  79. }
  80. {$IFC TARGET_CPU_68K }
  81. PROCEDURE UnloadSeg(routineAddr: UNIV Ptr);
  82.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  83.     INLINE $A9F1;
  84.     {$ENDC}
  85. {$ENDC}  {TARGET_CPU_68K}
  86.  
  87.  
  88.  
  89.  
  90. {$IFC OLDROUTINELOCATIONS }
  91. PROCEDURE ExitToShell;
  92.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  93.     INLINE $A9F4;
  94.     {$ENDC}
  95. {$ENDC}  {OLDROUTINELOCATIONS}
  96.  
  97.  
  98.  
  99. {$ALIGN RESET}
  100. {$POP}
  101.  
  102. {$SETC UsingIncludes := SegLoadIncludes}
  103.  
  104. {$ENDC} {__SEGLOAD__}
  105.  
  106. {$IFC NOT UsingIncludes}
  107.  END.
  108. {$ENDC}
  109.